package ro.cuzma.larry.bookscollection.md;

import java.util.GregorianCalendar;

import ro.cuzma.larry.persistance.common.Entity;
import ro.cuzma.larry.persistance.common.EntityIdAndValue;
import ro.cuzma.larry.persistance.common.EntityList;

public class Book extends Entity<Long> {

    private String                   name;
    private EntityIdAndValue<String> language;
    private EntityList<Author>       authors = new EntityList<Author>();
    private GregorianCalendar        aquireDate;

    public Book(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public Book() {
    }

    public GregorianCalendar getAquireDate() {
        return aquireDate;
    }

    public void setAquireDate(GregorianCalendar aquireDate) {
        this.aquireDate = aquireDate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public EntityList<Author> getAuthors() {
        return authors;
    }

    public void addAuthor(Author author) {
        this.authors.add(author);
    }

    public EntityIdAndValue<String> getLanguage() {
        return language;
    }

    public void setLanguage(EntityIdAndValue<String> language) {
        this.language = language;

    }

    public void setAuthors(EntityList<Author> authors) {
        this.authors = authors;
    }

}
